import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import home from '@/components/header/home'
import userPane from '@/components/content/user'
import addUser from '@/components/content/user/addUser'
import editUser from '@/components/content/user/editUser'
import configuration from '@/components/content/config/configuration'

import configPane from '@/components/content/config'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/helloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
      {
          path: '/',
          redirect:"/home"
      },
      {
          path: '/home',
          component: home,
          children: [
              {
                  path: '/home/userPane',
                  name: 'userPane',
                  component: userPane,
                  children: [
                      {
                          path: '/',
                          redirect:"/home/userPane/addUser"
                      },
                      {
                          path: '/home/userPane/addUser',
                          name: 'addUser',
                          component: addUser
                      },
                      {
                          path: '/editUser',
                          name: 'editUser',
                          component: editUser
                      }
                  ]
              },
              {
                  path: '/configPane',
                  name: 'configPane',
                  component: configPane,
                  children: [
                      {
                          path: '/configuration',
                          name: 'configuration',
                          component: configuration
                      }
                  ]
              }
              // },
              // {
              //     path: '/addUser',
              //     name: 'addUser',
              //     component: addUser
              // },
              // {
              //     path: '/editUser',
              //     name: 'editUser',
              //     component: editUser
              // },
              // {
              //     path: '/configuration',
              //     name: 'configuration',
              //     component: configuration
              // }
          ]
      }
  ]
})
